package com.edu.demo.entity.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class RegisterByPhoneVO {

    @ApiModelProperty(value = "密码",required = true)
    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).+$", message = "密码必须包含大小写字母和数字")
    private String password;

    @NotNull(message = "手机号不能为空")
    @Pattern(regexp = "^(1[3-9])[0-9]{9}$", message = "手机号错误")
    @ApiModelProperty(value = "手机号",required = true)
    private String phone;
}
